//
//  XXTableViewCell.swift
//  XXSwiftDemo
//
//  Created by admin on 2022/4/14.
//

import UIKit

class XXBaseTableViewCell: UITableViewCell {

    var row = 0
    var section = 0
    var data:XXBaseModel?{
        didSet{
            setData()
        }
    }
    // 设置数据
    func setData(){ }
    
    convenience init(_ identifier:String = "cell"){
        self.init(style: .default, reuseIdentifier: identifier)
    }
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        setupUI()
    }
    override func awakeFromNib() {
        super.awakeFromNib()
        setupUI()
    }
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setupUI(){
        self.selectionStyle = .none
        self.backgroundColor = .white
    }
    final func add(_ view:UIView){
        self.contentView.addSubview(view)
    }
    
}

